<?php

/*------------------------- Email --------------------------------------*/
/*
	add item to cart
	//cart item has following structure
	
	category id, product id, unit price, quantity (no duplicated item in cart)
	return: true, false
*/	
/*------------------------------------------------------------------------*/

function sendMail($rec, $sender, $sub, $content){	
	$headers = 'From: '. $sender . "\r\n";
  $headers .= 'Reply-To: '. $sender . "\r\n";
	$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
	
	return mail($rec, $sub, $content, $headers);
}

/*
	return true or false
*/
function ccMail($rec, $cc, $sender, $sub, $content){	
	$headers = 'From: '. $sender . "\r\n";
  $headers .= 'Reply-To: '. $sender . "\r\n";
	$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
	$headers .= 'Cc: ' . $cc . "\r\n";
	
	return mail($rec, $sub, $content, $headers);
}

